package com.sinothk.hm.snapshot.comm.view.slice;

import com.sinothk.hm.snapshot.ResourceTable;
import com.sinothk.hm.snapshot.comm.view.LoginAbility;
import com.sinothk.software.ui.base.WelcomeBaseAbilitySlice;
import com.sinothk.software.utils.XUtils;
import ohos.aafwk.content.Intent;
import ohos.app.dispatcher.task.TaskPriority;

public class WelcomeAbilitySlice extends WelcomeBaseAbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_welcome);

        getGlobalTaskDispatcher(TaskPriority.DEFAULT).delayDispatch(new Runnable() {
            @Override
            public void run() {
                XUtils.intent().open(getAbility(), LoginAbility.class)
                        .finish(true)
                        .start();
            }
        }, 3000);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
